import Vue from 'vue'
import Router from 'vue-router'
import Hello from '.././components/Hello'
import home from '.././components/home'
import homeIndex from '.././components/homeIndex'
import mine from '.././components/mine'
import zhushou from '.././components/zhushou'
import luxian from '.././components/luxian'
import etc_details from '.././components/etc_details'
import usual_dress from '.././components/usual_dress'
import cheliangluxian from '.././components/cheliangluxian'
import check_dress from '.././components/check_dress'
import select_dress from '.././components/select_dress'
import etc_card from '.././components/etc_card'
import etccard_cnt from '.././components/etccard_cnt'
import idcard from '.././components/idcard'
import oil_card from '.././components/oil_card'
import open_card from '.././components/open_card'
import recharge_card from '.././components/recharge_card'
import apply_paper from '.././components/apply_paper'
import checkouter from '.././components/checkouter'
import register from '.././components/register'
import indexone from '.././components/indexone'
import denglu from '.././components/denglu'
import denglu2 from '.././components/denglu2'
// import denglu from '.././components/denglu'
Vue.use(Router)


export default new Router({
  routes: [
    {
      path: '/',
      name: 'homeIndex',
      redirect: '/home',
      component: homeIndex,
      children: [
        {
          path: 'home',
          name: 'home',
          component: home
        },
        {
          path: 'zhushou',
          name: 'zhushou',
          component: zhushou
        }, {
          path: 'mine',
          name: 'mine',
          component: mine
        }
      ]
    }, {
      path: '/luxian',
      name: 'luxian',
      component: luxian
    }, {
      path: '/etc_details',
      name: 'etc_details',
      component: etc_details
    }, {
      path: '/usual_dress',
      name: 'usual_dress',
      component: usual_dress
    }, {
      path: '/cheliangluxian',
      name: 'cheliangluxian',
      component: cheliangluxian
    }, {
      path: '/check_dress',
      name: 'check_dress',
      component: check_dress
    }, {
      path: '/select_dress',
      name: 'select_dress',
      component: select_dress
    }, {
      path: '/etc_card',
      name: 'etc_card',
      component: etc_card
    }, {
      path: '/etccard_cnt',
      name: 'etccard_cnt',
      component: etccard_cnt
    }, {
      path: '/idcard',
      name: 'idcard',
      component: idcard
    }, {
      path: '/oil_card',
      name: 'oil_card',
      component: oil_card
    }, {
      path: '/open_card',
      name: 'open_card',
      component: open_card
    }, {
      path: '/recharge_card',
      name: 'recharge_card',
      component: recharge_card
    }, {
      path: '/apply_paper',
      name: 'apply_paper',
      component: apply_paper
    }, {
      path: '/checkouter',
      name: 'checkouter',
      component: checkouter
    }, {
      path: '/register',
      name: 'register',
      component: register
    }, {
      path: '/indexone',
      name: 'indexone',
      component: indexone
    }, {
      path: '/denglu',
      name: 'denglu',
      component: denglu
    }, {
      path: '/denglu2',
      name: 'denglu2',
      component: denglu2
    }
  ]
})
/*router.beforeEach((to,from,next) => {
  if (to.path !=='/Register' && !localStorge.isRegister) {
    router.push('/Register')
  }
})*/